rust-query-crlite: use enrolled.json rather than ccadb report#383
rust-query-crlite: use enrolled.json rather than ccadb report#383jschanck wants to merge 2 commits intomozilla:mainfrom
Conversation
mozkeeler
left a comment
There was a problem hiding this comment.
LGTM - just the one comment.
| let intermediates_path = db_dir.join("crlite.intermediates"); | ||
|
|
||
| let encoded_intermediates = intermediates.encode()?; | ||
| // Find the lexicographically largest "yyyymmdd-r" prefix among downloaded filter files. |
There was a problem hiding this comment.
Is this going to do the right thing if we ever publish more than 9 revisions in a day? (e.g., "20260218-10" I believe will sort before "20260218-9", but we'd want the former here, right?)
There was a problem hiding this comment.
Yeah, although we shouldn't have 10+ revisions and any recent enrolled.json is good enough. There are corner cases regardless of which enrolled.json you download. For example, if an intermediate drops out of the collection between revisions 1 and 2 you can get a false NotEnrolled result when querying the revision 1 filter. All that would be fixed if this program took both an intermediate and an end-entity as input, but I like the convenience of being able to provide just an end-entity.
The filter generation process produces a nice JSON file from the CCADB CSV report that the backend uses. Rather than worry about parsing the CSV correctly, we can have rust-query-crlite use the latest enrolled.json file.